package application;

import java.util.ArrayList;
import java.util.Hashtable;

import vo.Point;
import charts.LineChart;
import charts.PieChart;
import charts.ScatterChart;

public class DrawCharts {

	public static void main(String args[]) {
		// 画饼图
		Hashtable<String, Double> gender_percentage = new Hashtable<String, Double>();
		gender_percentage.put("male", 0.75);
		gender_percentage.put("female", 0.25);
		// PieChart.createChart(gender_percentage, "gender proporation",
		// "c:/ww.jpg", 200, 200);
		// 画折线图
		ArrayList<Point> points = new ArrayList<Point>();
		Point point1 = new Point(1, 1);
		Point point2 = new Point(5, 5);
		Point point3 = new Point(3, 3);

		points.add(point1);
		points.add(point2);
		points.add(point3);

		ArrayList<Point> points2 = new ArrayList<Point>();
		point1 = new Point(12, 2);
		point2 = new Point(4, 7);
		point3 = new Point(2, 9);

		points2.add(point1);
		points2.add(point2);
		points2.add(point3);
		// LineChart.createChart(points, "c://pt.jpg", "something title", 200,
		// 200);

		// LineChart.createChart(points, points2, "c://pptt.jpg",
		// "something title", 200, 200);

		// Scatter chart
		// ScatterChart.createChart(points, "c://test.jpg");

		ChartProperty cp = new ChartProperty();
		cp.setTitle("Property Distributions");
		cp.setxLabel("Frequency");
		cp.setyLabel("Frequency of Property Frequencies");
		cp.setDataSource("Followers");

		// ScatterChart.createChart(GraphModel.getFVSFFModel("followers"),
		// "c://followers_FF.jpg",cp);
		// ScatterChart.createChart(GraphModel.getFVSFFModel("statuses"),
		// "c://statuses_FF.jpg",cp);

		// 画折线图
		LineChart.createChart(points,points2, "c://pt.jpg", "something title", 200, 200);

	}
}
